package com.sphd.beautysalon.adapters;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sphd.beautysalon.R;
import com.sphd.beautysalon.info.InvestorItemInfo;
import com.wzh.frame.utils.BigDisMailUtils;

import java.util.List;

/**
 * Created by Hu on 2016/11/3.
 */

public class InvestorItemAdapter extends BaseQuickAdapter<InvestorItemInfo> {
    public InvestorItemAdapter(int layoutResId, List<InvestorItemInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, InvestorItemInfo investorItemInfo) {
        baseViewHolder.setText(R.id.m_year, investorItemInfo.getmYear())
                .setText(R.id.m_year_account_money, turn(investorItemInfo.getmYearTurnover()))
                .setText(R.id.m_year_cut_money, turn(investorItemInfo.getmYearCut()));
    }
    public String turn(Object val) {
        return BigDisMailUtils.turnTrim(val);
    }
}
